summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@peacefrogs.net>2012-09-05 14:13:08 +0200
committerÉtienne Loks <etienne.loks@peacefrogs.net>2012-09-05 14:13:08 +0200
commitde026041f5cf656044b28aab812c3296ddf95959 (patch)
tree5fda51063afcc2804caec71db76250009fa9ec1f
parent0620f0165846abe46b77665950504a70857e9c94 (diff)
downloadChimère - projet Saclay-de026041f5cf656044b28aab812c3296ddf95959.tar.bz2
Chimère - projet Saclay-de026041f5cf656044b28aab812c3296ddf95959.zip
Work on news and welcome pages
-rw-r--r--static/saclay/css/styles-saclay.css84
-rw-r--r--static/saclay/images/logo.pngbin0 -> 14661 bytes
-rw-r--r--static/saclay/images/welcome_logo_chronos.pngbin0 -> 5446 bytes
-rw-r--r--static/saclay/images/welcome_logo_malaquais.pngbin0 -> 5306 bytes
-rw-r--r--static/saclay/images/welcome_logo_terre_et_cite.pngbin0 -> 6152 bytes
-rw-r--r--templates/chimere/blocks/news.html38
-rw-r--r--templates/chimere/blocks/welcome.html61
-rw-r--r--templates/chimere/main_map.html3
8 files changed, 179 insertions, 7 deletions
diff --git a/static/saclay/css/styles-saclay.css b/static/saclay/css/styles-saclay.css
index 50de8aa..d3b6384 100644
--- a/static/saclay/css/styles-saclay.css
+++ b/static/saclay/css/styles-saclay.css
@@ -4,7 +4,7 @@
/* main */
html, h1, h2,
-.action li,
+.action li, .ui-dialog .ui-dialog-titlebar,
#chimere_itinerary_content div.s{
color:#444;
}
@@ -21,7 +21,7 @@ html, h1, h2,
/* strong */
-.edit h3, h4, legend{
+.no-titlebar h2, .edit h3, h3, h4, legend{
color:#000;
}
@@ -48,7 +48,8 @@ body, h2, #content,
}
/* alternative background */
-ul#multimedia_list_content li,
+.no-titlebar h2,
+ul#multimedia_list_content li, #welcome .footer,
#chimere_itinerary_content div.n, #action,
div.cloud h4, #detail_footer, .sidebar-handler:hover,
#ul_categories li.main_category .subcategories li span{
@@ -61,10 +62,14 @@ div.cloud h4, #detail_footer, .sidebar-handler:hover,
}
/* blank */
-.edit h4{
+edit h4{
background-color:#fff;
}
+h3{
+ background:none;
+}
+
/*
* Borders
*/
@@ -77,7 +82,7 @@ ul#multimedia_list_content li,
#panel, #map-footer, #utils-div, #action,
#panel #categories, .main_category, #page_title,
#ul_categories .subcategories li, #action-panel,
-#chimere_itinerary_form{
+#chimere_itinerary_form, .welcome-logo{
border-color:#999;
}
@@ -110,11 +115,78 @@ html, body{
.action li{
padding:2px 18px;
}
-
h4{
font-weight:bold;
}
+/* no title bar dialog*/
+
+.no-titlebar.ui-dialog .ui-dialog-titlebar{
+ background:none;
+ width:10px;
+ right:0;
+ position:absolute;
+ z-index:100;
+ border:none;
+}
+
+.no-titlebar .title{
+ margin:0;
+}
+
+.no-titlebar .title{
+ margin:0;
+ text-align:left;
+ background-image:url(../images/logo.png) ;
+ background-repeat:no-repeat;
+ background-position: left center;
+ height:85px;
+}
+
+.no-titlebar .title h2{
+ display:none;
+}
+
+.no-titlebar h3, .no-titlebar h4{
+ padding:0 1em;
+}
+
+.no-titlebar.ui-widget{
+ font-size:0.8em;
+ padding:0;
+ margin:0;
+}
+
+.no-titlebar p{
+ padding:0 1em;
+}
+
+#welcome_message{
+ padding:0;
+ margin:0;
+}
+
+.no-titlebar .footer{
+ padding:0.3em 1em;
+ font-size:0.9em;
+}
+
+.welcome-logo{
+ border-top:1px solid;
+}
+
+#welcome .news{
+ max-height:200px;
+ overflow:auto;
+}
+
+.info{
+ border:none;
+ padding:0;
+}
+
+/* edition */
+
.fieldWrapper{
padding:1px 4px;
}
diff --git a/static/saclay/images/logo.png b/static/saclay/images/logo.png
new file mode 100644
index 0000000..a5092c6
--- /dev/null
+++ b/static/saclay/images/logo.png
Binary files differ
diff --git a/static/saclay/images/welcome_logo_chronos.png b/static/saclay/images/welcome_logo_chronos.png
new file mode 100644
index 0000000..f48b9b8
--- /dev/null
+++ b/static/saclay/images/welcome_logo_chronos.png
Binary files differ
diff --git a/static/saclay/images/welcome_logo_malaquais.png b/static/saclay/images/welcome_logo_malaquais.png
new file mode 100644
index 0000000..d621aad
--- /dev/null
+++ b/static/saclay/images/welcome_logo_malaquais.png
Binary files differ
diff --git a/static/saclay/images/welcome_logo_terre_et_cite.png b/static/saclay/images/welcome_logo_terre_et_cite.png
new file mode 100644
index 0000000..4a25472
--- /dev/null
+++ b/static/saclay/images/welcome_logo_terre_et_cite.png
Binary files differ
diff --git a/templates/chimere/blocks/news.html b/templates/chimere/blocks/news.html
new file mode 100644
index 0000000..e791758
--- /dev/null
+++ b/templates/chimere/blocks/news.html
@@ -0,0 +1,38 @@
+{% load i18n sanitize chimere_tags %}
+{% if news_lst %}
+<script type='text/javascript'>
+$(function(){
+ $('#news div.media-player').jmeEmbedControls();
+ $('#news video').each(function(index){$(this).pause()});
+ $('#news audio').each(function(index){$(this).pause()});
+ $("#news").dialog({width:600, dialogClass:'no-titlebar',
+ autoOpen:false});
+});
+</script>
+<div id='news' style='display:none'>
+ <h3>{% trans "News" %}</h3>
+ <div class='news'>
+ {% for news in news_lst %}
+ <div class='info'>
+ {% if news.title %}
+ <h4>{{news.title}} &ndash; {{ news.date }}</h4>
+ {{news.content|safe}}
+ {% else %}
+ <h4>{{news.name}} &ndash; {{ news.start_date }}{% if news.end_date %} - {{ news.end_date }}{% endif %}</h4>
+ {% if news.description %}
+ {{news.description|sanitize:"p b i br hr strong em span:style a:href:target ul li ol h1 h2 h3 h4 table td th tr"|safe}}
+ {% endif %}
+ {% endif %}
+ <p class='marker_link'>
+ {% if news.point %}
+ <a href='{% get_tinyfied_url news area_name %}'>{% trans "See it on the map"%}</a>
+ {% endif %}{% if news.point and news.url %} - {% endif %}{% if news.url %}
+ <a href='{{news.url}}'>{% trans "Go to the event website"%}</a>
+ {% endif %}
+ </p>
+ </div>
+ {%endfor%}
+ </div>
+</div>
+{% endif %}
+
diff --git a/templates/chimere/blocks/welcome.html b/templates/chimere/blocks/welcome.html
new file mode 100644
index 0000000..00e607e
--- /dev/null
+++ b/templates/chimere/blocks/welcome.html
@@ -0,0 +1,61 @@
+{% load i18n sanitize chimere_tags %}
+{% if news_lst or welcome_message %}
+<script type='text/javascript'>
+$(function(){
+ $('#welcome div.media-player').jmeEmbedControls();
+ $('#welcome video').each(function(index){$(this).pause()});
+ $('#welcome audio').each(function(index){$(this).pause()});
+ $("#welcome").dialog({width:630, dialogClass:'no-titlebar'});
+});
+</script>
+<div id='welcome' style='display:none'>
+ <div class='title'>
+ <h2>{{title}}</h2>
+ </div>
+ {% if welcome_message %}
+ <h3>{% trans "Editorial" %}</h3>
+ <div id='welcome_message'>
+ {{welcome_message|safe}}
+ </div>
+ {% endif %}{% if news_lst %}
+ <h3>{% trans "News" %}</h3>
+ <div class='news'>
+ {% for news in news_lst %}
+ <div class='info'>
+ {% if news.title %}
+ <h4>{{news.title}} &ndash; {{ news.date }}</h4>
+ {{news.short_desc|safe}}
+ {% else %}
+ <h4>{{news.name}} &ndash; {{ news.start_date }}{% if news.end_date %} - {{ news.end_date }}{% endif %}</h4>
+ {% if news.description %}
+ {{news.short_desc|sanitize:"p b i br hr strong em span:style a:href:target ul li ol h1 h2 h3 h4 table td th tr"|safe}}
+ {% endif %}
+ {% endif %}
+ <p class='marker_link'>
+ {% if news.point %}
+ <a href='{% get_tinyfied_url news area_name %}'>{% trans "See it on the map"%}</a> -
+ {% endif %}
+ <a href='#' class='get_more_information'>{% trans "More informations"%}</a>
+ {% if news.url %}
+ - <a href='{{news.url}}'>{% trans "Go to the event website"%}</a>
+ {% endif %}
+ </p>
+ </div>
+ {%endfor%}
+ </div>
+ {% endif %}
+ <div class='welcome-logo'>
+ <a href=''><img src='{{STATIC_URL}}saclay/images/welcome_logo_malaquais.png'/></a><a href=''><img src='{{STATIC_URL}}saclay/images/welcome_logo_terre_et_cite.png'/></a><a href=''><img src='{{STATIC_URL}}saclay/images/welcome_logo_chronos.png'/></a>
+ </div>
+ <div class='footer'><a href='#' class='get_more_information'>{% trans "See all news" %}</a></div>
+</div>
+<script type='text/javascript'>
+$(function(){
+ $('.get_more_information').click(function(){
+ $('#welcome').dialog('close');
+ $('#news').dialog('open');
+ return false;
+ });
+});
+</script>
+{% endif %}
diff --git a/templates/chimere/main_map.html b/templates/chimere/main_map.html
index a7991bd..af40f24 100644
--- a/templates/chimere/main_map.html
+++ b/templates/chimere/main_map.html
@@ -73,9 +73,10 @@
{% if areas_visible %}
{% display_areas %}
{% endif %}
- {% display_news news_visible %}
<div id='permalink' class='ui-widget ui-button ui-state-default ui-corner-all'></div>
</div>
+ {% display_welcome %}
+ {% display_news news_visible %}
{{block.super}}
<div id='main-map'></div>
<div id='default-message'></div>